package nkr1pt.popkorn.events;

import java.io.File;
import nkr1pt.popkorn.download.DownloadCandidate;
import nkr1pt.popkorn.download.DownloadCandidateItem;

/**
 *
 * @author Kristof Vanhaeren
 */
public class DownloadEvent extends PopkornEvent {

    private File file;

    private DownloadCandidate downloadCandidate;

    private DownloadCandidateItem downloadCandidateItem;

    public DownloadEvent(String source, PopkornEvent.EventType type) {
        super(source, type);
    }

    public DownloadEvent(PopkornEvent event) {
        super(event.getSource(), event.getType());
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public DownloadCandidate getDownloadCandidate() {
        return downloadCandidate;
    }

    public void setDownloadCandidate(DownloadCandidate downloadCandidate) {
        this.downloadCandidate = downloadCandidate;
    }

    public DownloadCandidateItem getDownloadCandidateItem() {
        return downloadCandidateItem;
    }

    public void setDownloadCandidateItem(DownloadCandidateItem downloadCandidateItem) {
        this.downloadCandidateItem = downloadCandidateItem;
        this.downloadCandidate = downloadCandidateItem.getDownloadCandidate();
    }
}